package com.link2room.ironhide.util.image;

import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * Created by LN on 2016/11/29.
 */
public class ImgCompressFactory {
    /**
     * 获取ImgCompress
     * @param file
     * @return
     * @throws IOException
     */
    public static ImgCompress createImgCompress(MultipartFile file) throws IOException {
        ImageUtil.checkImageFile(file);
        return new ImgCompress(file.getInputStream());
    }
}
